package cn.gddevon.beans.anno;

/**
 * 读取xml开启注解所需实体类
 */
public class OnAnnotation {
    // 指定扫描包名
    private String classes;
    private static OnAnnotation onAnnotation;

    private OnAnnotation() {}

    private void setClasses(String classes) {
        this.classes = classes;
    }

    public String getClasses() {
        return classes;
    }

    public static OnAnnotation getOnAnnotation() {
        return onAnnotation;
    }

    public static OnAnnotation getInstance(String classes) {
        if (onAnnotation == null) {
            synchronized (OnAnnotation.class){
                if(onAnnotation == null){
                    onAnnotation = new OnAnnotation();
                    onAnnotation.setClasses(classes);
                }
            }
        }
        return onAnnotation;
    }

}
